package cc.comac.mom.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.jackrain.nea.sys.domain.User;

import cc.comac.mom.api.EquipMaintainWorkOrderService;
import cc.comac.mom.bean.EquipMaintainWorkOrder;
import cc.comac.mom.bean.EquipMaintainWorkOrderBean;
import cc.comac.mom.util.ResultBean;
import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping("/EquipMaintainWorkOrder")
public class EquipMaintainWorkOrderController {

	@Autowired
	private EquipMaintainWorkOrderService equipMaintainWorkOrderService;

	@ApiOperation("逻辑删除对应数据")
	@RequestMapping(value = "/batchDeleteMaintainWorkOrder", method = RequestMethod.POST)
	public ResultBean batchDeleteMaintainWorkOrder(@RequestBody List<EquipMaintainWorkOrder> list) {
		ResultBean batchDeleteMaintainWorkOrder = equipMaintainWorkOrderService.batchDeleteMaintainWorkOrder(list);
		return batchDeleteMaintainWorkOrder;
	}

	@ApiOperation("派工 调整日期，调整执行人")
	@RequestMapping(value = "/updateBySomeField", method = RequestMethod.POST)
	public ResultBean updateBySomeField(@RequestBody EquipMaintainWorkOrder equipMaintainWorkOrder) {
		ResultBean updateBySomeField = equipMaintainWorkOrderService.updateBySomeField(equipMaintainWorkOrder);
		return updateBySomeField;
	}

	@ApiOperation("查询对应保养工单数据通过条件")
	@RequestMapping(value = "/selectBySomeField", method = RequestMethod.POST)
	public ResultBean selectBySomeField(@RequestBody EquipMaintainWorkOrderBean obj) {
		ResultBean selectBySomeField = equipMaintainWorkOrderService.selectBySomeField(obj);
		return selectBySomeField;
	}

}
